//
//  LastStageTabCell.m
//  PASystem
//
//  Created by 刘沿 on 16/8/30.
//  Copyright © 2016年 czd. All rights reserved.
//

#import "LastStageTabCell.h"

@implementation LastStageTabCell

+ (instancetype)WithLastStageTabCell{

    return [[[NSBundle mainBundle] loadNibNamed:@"LastStageTabCell" owner:nil options:nil] lastObject];
}

- (void)setModel:(LastStageTabModel *)model{
    _model = model;

    self.NAME.text = model.NAME;
    self.ADDRESS.text = model.ADDRESS;
    self.LEADER.text = model.LEADER;
    
    //时间戳转时间
    NSString *string2 = model.TIME;
    NSDateFormatter *fmt2 = [[NSDateFormatter alloc] init];
    fmt2.dateFormat = @"MMM d, yyyy HH:mm:ss aa";
    fmt2.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en-US"];
    NSDate *date2 = [fmt2 dateFromString:string2];
    NSDateFormatter *fm2 = [[NSDateFormatter alloc] init];
    fm2.dateFormat = @"yyyy-MM-dd";
    NSString *selfYear2 = [fm2 stringFromDate:date2];
    
    self.TIME.text = selfYear2;

    
}



@end
